import store from '@/store'
export default {
  methods: {
    showTen() {
      return 10
    },
    checkPermission(btnName) {
      // 为了避免退出时清空数据报错, 三元表达式保证数据存在
      const permList = store.state.user.userInfo.roles
        ? store.state.user.userInfo.roles.points : []
      return permList.includes(btnName)
    }
  }
}
